home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- CEBSwitchboard.c
-
- The Event Broadcasting Switchboard Class
-
- Event Broadcasting switchboard, uses a single global instance of a
- CEBCollaborator broadcast events to any object that needs it.
-
- SUPERCLASS = CSwitchboard
-
- Copyright © 1992 Joe Zobkiw. All rights reserved.
- Portions Copyright © 1990 Symantec Corporation. All rights reserved.
-
- ******************************************************************************/
-
- #include "CEBSwitchboard.h"
- #include "CEBCollaborator.h"
- #include "CSwitchboard.h"
- #include "CDesktop.h"
-
- /*** Global Variables ***/
-
- extern CDesktop *gDesktop; /* The visible Desktop */
- extern CEBCollaborator *gEBCollaborator; /* event broadcaster */
-
- /******************************************************************************
- IEBSwitchboard
-
- Initialize an EBSwitchboard object.
- ******************************************************************************/
-
- void CEBSwitchboard::IEBSwitchboard()
- {
- CSwitchboard::ISwitchboard();
- }
-
-
- /******************************************************************************
- DispatchEvent
-
- Handle broadcasting all events except null events
-
- ******************************************************************************/
-
- void CEBSwitchboard::DispatchEvent(EventRecord *macEvent)
- {
- gEBCollaborator->BroadcastEvent(macEvent);
- inherited::DispatchEvent(macEvent);
- }
-
-
- /******************************************************************************
- DoIdle
-
- Handle broadcasting null events here because they do not get routed
- through DispatchEvent.
-
- ******************************************************************************/
-
- void CEBSwitchboard::DoIdle(EventRecord *macEvent) /* Usually a null or system event */
- {
- gEBCollaborator->BroadcastEvent(macEvent);
- inherited::DoIdle(macEvent);
- }